/************************************************************************/
/* FXRenderState.cpp                                                    */
/* 2004/04/15                                                           */
/************************************************************************/

#include <d3dx9.h>
#include "dxutil.h"
#include "FXRenderState.h"

/************************************************************************/
#include <windows.h>
#include <windowsx.h>
#include <basetsd.h>
#include <mmsystem.h>
#include <winuser.h>
#include <stdio.h>
#include <tchar.h>
#include <D3D9.h>
#include "dxutil.h"
#include "d3dutil.h"
#include "d3dfont.h"
#include "D3DEnumeration.h"
#include "DXUtil.h"
#include "D3DEnumeration.h"
#include "D3DSettings.h"

using namespace FX;
/********************** CFXRenderStateManager ***************************/
/************************************************************************/
/*                                                                      */
/************************************************************************/

CFXRenderStateManager::CFXRenderStateManager()
{
            int nTemp = 0;
            nTemp = 0;
        };
void 
CFXRenderStateManager::PushRenderState( void )
{
    /*
    g_Draw.m_pd3dDevice->GetRenderState(D3DRS_CULLMODE, &_dwCullMode);
    g_Draw.m_pd3dDevice->GetRenderState(D3DRS_ALPHABLENDENABLE, &_dwBlendEnable);
    g_Draw.m_pd3dDevice->GetRenderState(D3DRS_SRCBLEND, &_dwSRCBlend);
    g_Draw.m_pd3dDevice->GetRenderState(D3DRS_DESTBLEND, &_dwDestBlend);
    g_Draw.m_pd3dDevice->GetRenderState(D3DRS_FOGENABLE, &_dwFogEnable);
    g_Draw.m_pd3dDevice->GetRenderState(D3DRS_ZENABLE, &_dwZEnable);
    g_Draw.m_pd3dDevice->GetRenderState(D3DRS_ZWRITEENABLE, &_dwZWrite);

    g_Draw.m_pd3dDevice->GetTextureStageState( 0, D3DTSS_ALPHAOP, &_dwAlphaOp);
	g_Draw.m_pd3dDevice->GetTextureStageState( 0, D3DTSS_COLOROP, &_dwColorOp);

	g_Draw.m_pd3dDevice->GetTextureStageState( 0, D3DTSS_ALPHAARG1, &_dwAlphaArg1);
	g_Draw.m_pd3dDevice->GetTextureStageState( 0, D3DTSS_ALPHAARG2, &_dwAlphaArg2);
	g_Draw.m_pd3dDevice->GetTextureStageState( 0, D3DTSS_COLORARG1, &_dwColorArg1);
	g_Draw.m_pd3dDevice->GetTextureStageState( 0, D3DTSS_COLORARG2, &_dwColorArg2);
    */
}

/************************************************************************/
/*                                                                      */
/************************************************************************/
void 
CFXRenderStateManager::PopRenderState( void )
{
    /*
    g_Draw.m_pd3dDevice->SetRenderState(D3DRS_CULLMODE, _dwCullMode);
    g_Draw.m_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, _dwBlendEnable);
    g_Draw.m_pd3dDevice->SetRenderState(D3DRS_SRCBLEND, _dwSRCBlend);
    g_Draw.m_pd3dDevice->SetRenderState(D3DRS_DESTBLEND, _dwDestBlend);

    g_Draw.m_pd3dDevice->SetRenderState(D3DRS_FOGENABLE, _dwFogEnable);
    g_Draw.m_pd3dDevice->SetRenderState(D3DRS_ZENABLE, _dwZEnable);
    g_Draw.m_pd3dDevice->SetRenderState(D3DRS_ZWRITEENABLE, _dwZWrite);

    g_Draw.m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, _dwAlphaOp);
	g_Draw.m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP, _dwColorOp);

	g_Draw.m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, _dwAlphaArg1);
	g_Draw.m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2, _dwAlphaArg2);
	g_Draw.m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, _dwColorArg1);
	g_Draw.m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, _dwColorArg2);
    */
}

